﻿using System.Collections;
using UnityEngine;


public class EffectManager : MonoBehaviour
{
    public static EffectManager Instance;
    private void Awake()
    {
        if (Instance != null && Instance != this)
        {
            Destroy(gameObject);
            return;
        }
        Instance = this;
        //DontDestroyOnLoad(gameObject);
    }
    public void Play(GameObject effect,Vector3 pos,float destroyTime) 
    {
        var gameObj=GameObject.Instantiate(effect,pos,Quaternion.identity);
        Destroy(gameObj,destroyTime);
    }
        
}
